Kristian Rietveld [Wed, 15 Dec 2010 20:17:27 +0000 (21:17 +0100)]
Correct calculation of the cell focus rectangle
The cell's focus rectangle is located around the cell's aligned area.
To get to the correct coordinates for this rectangle, we have to subtract
focus_line_width from the found aligned_area.
Tristan Van Berkom [Tue, 14 Dec 2010 06:52:40 +0000 (15:52 +0900)]
Make GtkCellArea independantly GtkBuildable.
Simply use the GtkCellLayoutIface hooks for this.
Tristan Van Berkom [Mon, 13 Dec 2010 07:27:36 +0000 (16:27 +0900)]
Fixed an error in my last commit in gtk_cell_area_box_context_copy().
Tristan Van Berkom [Mon, 13 Dec 2010 06:58:07 +0000 (15:58 +0900)]
Added gtk_entry_completion_new_with_area()
Tristan Van Berkom [Mon, 13 Dec 2010 06:43:58 +0000 (15:43 +0900)]
Updated some docs and gtk.symbols file for new apis
Added gtk_cell_area_context_get_preferred_height_for_width and
width_for_height & gtk_cell_area_copy_context() to gtk.symbols
and gtk3-sections.txt (also finished up documenting those apis).
Tristan Van Berkom [Mon, 13 Dec 2010 06:37:12 +0000 (15:37 +0900)]
Fixed gtk_cell_area_box_context_copy() to also copy it's allocations.
Kristian Rietveld [Sun, 12 Dec 2010 16:32:59 +0000 (17:32 +0100)]
Handle clicks in indentation area
For this case, we want to set focus on the first cell in the column.
Tristan Van Berkom [Fri, 10 Dec 2010 07:22:06 +0000 (16:22 +0900)]
Make GtkTreeView explicitly focus the first cell in the first column when grabbing focus
When focus is initially grabbed and there is no focus column, when selecting
the first column for focus, further explicitly focus into the first cell
using gtk_cell_area_focus().
Tristan Van Berkom [Fri, 10 Dec 2010 07:12:02 +0000 (16:12 +0900)]
Fixed GtkTreeView to give focus back to the last focued cell when hitting
the edge.
When focusing left/right or up/down inside GtkCellArea, now we save what
was the last focused cell and if we hit the side (or top or bottom) of
the view we then restore focus to the last focused cell.
Tristan Van Berkom [Thu, 9 Dec 2010 09:21:32 +0000 (18:21 +0900)]
Add an editable cell to testverticalcells showing functional vertical focus navigation.
Tristan Van Berkom [Thu, 9 Dec 2010 09:01:16 +0000 (18:01 +0900)]
Modified gtk_tree_view_move_cursor_up_down to move focus inside the cell area
This currently leaves us the problem of maintaining the right cell in
focus for horizontal areas, the solution for that comming in the
next patch.
Tristan Van Berkom [Thu, 9 Dec 2010 08:50:05 +0000 (17:50 +0900)]
Removing gtk_tree_view_move_focus_column() and only calling gtk_cell_area_focus()
This function did alot of nothing, gtk_cell_area_focus() simply returns whether
the focus stays in the area (column) or not, seems not to cause regressions to
just call it directly instead.
Tristan Van Berkom [Sun, 12 Dec 2010 15:18:00 +0000 (00:18 +0900)]
Added apis to GtkCellArea for GtkIconView purposes.
Added a few apis,
- GtkCellAreaContext get_preferred_height_for_width &
width for height apis and vfuncs, this lets the icon view
request the collective (and aligned) height for width for
a said row.
- gtk_cell_area_copy_context() this creates a duplicate of
an already created and requested context, this way the icon
view uses a global context to request the widths of all rows
and then makes a copy with all the stored alignments and
uses a separate copy to calculate the height and alignments
of each row separately.
Kristian Rietveld [Sun, 12 Dec 2010 14:22:49 +0000 (15:22 +0100)]
Welcome _gtk_tree_view_column_get_cell_at_pos to the second dimension
Kristian Rietveld [Sun, 12 Dec 2010 14:09:27 +0000 (15:09 +0100)]
Make gtk_tree_view_get_cell_area() aware of row separators
Kristian Rietveld [Sun, 12 Dec 2010 14:03:33 +0000 (15:03 +0100)]
Add unit test for row separator height
Kristian Rietveld [Sun, 12 Dec 2010 13:34:26 +0000 (14:34 +0100)]
Do not enforce a minimum of expander_size in gtk_tree_view_get_row_height
Instead this is now enforced in gtk_tree_view_get_cell_area_height().
There are rows for which a height in between 0 and expander_size is
allowed, for example separator rows.
Tristan Van Berkom [Thu, 9 Dec 2010 09:29:36 +0000 (18:29 +0900)]
Fixed some glitches in GtkCellAreaBox keynav from my last commit.
Tristan Van Berkom [Thu, 9 Dec 2010 09:20:39 +0000 (18:20 +0900)]
Make GtkCellAreaBox remember what was the last focus cell so that when
cycling focus from row to row for a horizontal area we can remember
where focus was the last time around.
Tristan Van Berkom [Sun, 12 Dec 2010 08:15:46 +0000 (17:15 +0900)]
Added "edit_only" argument to gtk_cell_area_activate()
This argument allows the caller to specify that only an editable
cell should start editing but an activatable cell should not toggle
it's state, this is important for public apis like
gtk_tree_view_set_cursor_on_cell() which are only intended to
programatically bring attention to the editing of a specific
row or cell but not actually change any data.
GtkTreeView & CellAreaScaffold updated for the last minute api change.
Tristan Van Berkom [Sun, 12 Dec 2010 07:43:07 +0000 (16:43 +0900)]
Removed the resetting_context flag from GtkTreeViewColumn private data
No longer need to detect if we're currently resetting the context since
the context properly now avoids re-triggering the reset by properly
avoiding to notify properties that dont change as a result of the reset.
Tristan Van Berkom [Sun, 12 Dec 2010 07:42:37 +0000 (16:42 +0900)]
Fixed gtk_cell_area_context_real_reset() to only notify properties if they change.
Tristan Van Berkom [Thu, 9 Dec 2010 04:57:58 +0000 (13:57 +0900)]
Removed calculation of background area when about to edit a cell (no need to check the background area of the cell in this case).
Tristan Van Berkom [Thu, 9 Dec 2010 04:57:21 +0000 (13:57 +0900)]
Changed misleading variable name in gtk_cell_area_real_activate.
Tristan Van Berkom [Wed, 8 Dec 2010 13:30:03 +0000 (22:30 +0900)]
Fixed gtk-docs typo in gtkcellarea.c
Tristan Van Berkom [Wed, 8 Dec 2010 12:27:52 +0000 (21:27 +0900)]
Fixed foreach_alloc call from gtk_cell_area_real_render to pass the real background area.
Tristan Van Berkom [Wed, 8 Dec 2010 12:18:05 +0000 (21:18 +0900)]
Added 'background_area' calculation to GtkCellAreaClass->foreach_alloc vfunc
This allows us to reduce code allocation code paths in subclasses, as
a result GtkCellArea implements the ->render() vfunc and the subclass
only decides the cell area and background area distributions in a single
code path.
Tristan Van Berkom [Wed, 8 Dec 2010 06:24:49 +0000 (15:24 +0900)]
Merge branch 'master' into treeview-refactor
Milan Bouchet-Valat [Tue, 7 Dec 2010 18:03:55 +0000 (19:03 +0100)]
More annotations for GdkDisplay
Mostly (out), and a few (allow-none) for parameters.
Matthias Clasen [Tue, 7 Dec 2010 17:59:17 +0000 (12:59 -0500)]
GtkStyleContext migration guide tweaks
Move the guide into the 2-to-3 guide, since it is something
you have to do when porting from 2 to 3. Also add an example
for handling of temporary state changes and some more text
about color handling.
Matthias Clasen [Tue, 7 Dec 2010 14:55:18 +0000 (09:55 -0500)]
Some doc additions
Tristan Van Berkom [Tue, 7 Dec 2010 14:45:48 +0000 (23:45 +0900)]
Added minimum size parameter to GtkWidgetClass->adjust_size_allocation.
This allows us to add a check before executing
->get_preferred_height_for_width() to ensure we always
request for at least the minimum required size (and lets
us remove the warning in gtkcontainer.c telling implementors
to do this check manually from thier container implementations).
Cosimo Cecchi [Tue, 7 Dec 2010 09:13:32 +0000 (10:13 +0100)]
label: plug a memory leak
Cosimo Cecchi [Tue, 7 Dec 2010 09:08:47 +0000 (10:08 +0100)]
app-chooser-widget: plug a memory leak
Tristan Van Berkom [Tue, 7 Dec 2010 08:04:04 +0000 (17:04 +0900)]
Adding gtk_tree_view_column_new_with_area to gtk.symbols and gtk3-sections.txt.
Tristan Van Berkom [Tue, 7 Dec 2010 05:09:26 +0000 (14:09 +0900)]
Revert "Temporary fix to make separator rows request enough space for the expander size."
This reverts commit
515af9ce702d77c5d1ab0a089c51564c31cd2247.
Tristan Van Berkom [Tue, 7 Dec 2010 04:49:21 +0000 (13:49 +0900)]
Temporary fix to make separator rows request enough space for the expander size.
This fix is incorrect, treeviews dont rely on the expander size for drawing
separator rows (added XXX comment in line), need to fix this somewhere else
Tristan Van Berkom [Tue, 7 Dec 2010 04:11:27 +0000 (13:11 +0900)]
Fixed my mistake in validate_row (), now the height of treeviews in GtkEntryCompletion is correct again.
Matthias Clasen [Tue, 7 Dec 2010 01:37:30 +0000 (20:37 -0500)]
Bump version
Matthias Clasen [Tue, 7 Dec 2010 00:05:18 +0000 (19:05 -0500)]
More !srcdir fixes for the stylecontext test
Matthias Clasen [Mon, 6 Dec 2010 22:44:12 +0000 (17:44 -0500)]
Update for the removal of gtk_decorated_window_ apis
Matthias Clasen [Mon, 6 Dec 2010 19:35:13 +0000 (14:35 -0500)]
Fix POTFILES for recent changes
Matthias Clasen [Mon, 6 Dec 2010 19:11:46 +0000 (14:11 -0500)]
Prepare the stylecontext test to run out-of-srcdir
This is necessary to make distcheck work.
Matthias Clasen [Mon, 6 Dec 2010 19:10:42 +0000 (14:10 -0500)]
Allow + in identifiers
This is necessary since we treat paths as identifiers in
@import rules, and it is common to have a + in there (at least
when distchecking gtk+ ...)
Benjamin Otte [Mon, 6 Dec 2010 17:56:11 +0000 (18:56 +0100)]
gdk: Add section docs for GdkRGBA
Benjamin Otte [Mon, 6 Dec 2010 16:20:13 +0000 (17:20 +0100)]
gtk: Remove old DirectFB code for drawing window decorations
I'm not sure it'd even compile.
Benjamin Otte [Mon, 6 Dec 2010 16:19:56 +0000 (17:19 +0100)]
gdk: Remove GdkWindowObject typedef
It's unused by now.
Kjartan Maraas [Mon, 6 Dec 2010 17:13:24 +0000 (18:13 +0100)]
Updated Norwegian bokmål translation
Colin Walters [Mon, 6 Dec 2010 16:42:47 +0000 (11:42 -0500)]
introspection: Fix (out) for gdk_screen_get_monitor_geometry
Scanner doesn't detect this case correctly because it's a typedef;
work around it here by explicitly specifying that it's caller
allocates. See bug 636393 for the scanner issue.
Colin Walters [Mon, 6 Dec 2010 16:27:57 +0000 (11:27 -0500)]
configure: Drop AC_PREREQ back down to 2.62
Commit
39f57407639b85c7e929d349ee95eabc46d083e bumped the
autoconf version to 2.64 with no explicit rationale. It looks
to me like a copy-and-paste error. Reverting back to 2.62 (the
previous version). 2.63 at least (RHEL6) works here.
Matthias Clasen [Mon, 6 Dec 2010 15:56:03 +0000 (10:56 -0500)]
Update NEWS for 2.91.6
Matthias Clasen [Mon, 6 Dec 2010 15:12:22 +0000 (10:12 -0500)]
Disable theme engines for now
They need to be ported to GtkThemingEngine.
Murray Cumming [Mon, 6 Dec 2010 15:01:55 +0000 (16:01 +0100)]
Fix a typo to fix the build.
Matthias Clasen [Mon, 6 Dec 2010 14:50:01 +0000 (09:50 -0500)]
Add gtk_widget_path_get_type to the headers
Bug 636591
Kristian Rietveld [Mon, 6 Dec 2010 13:13:40 +0000 (14:13 +0100)]
Port Quartz backend to latest rendering-cleanup changes
Matthias Clasen [Mon, 6 Dec 2010 12:26:00 +0000 (07:26 -0500)]
Fix Makefile syntax
Tristan Van Berkom [Mon, 6 Dec 2010 10:04:51 +0000 (19:04 +0900)]
Adding gtk_tree_view_column_new_with_area().
Creates a treeviewcolumn using a specific GtkCellArea.
This patch also makes GtkEntryCompletion use the new api
instead of g_object_new().
Tristan Van Berkom [Mon, 6 Dec 2010 08:27:03 +0000 (17:27 +0900)]
Fixed some nit-picking bugs in GtkCellArea
- Dont try fetching a cell renderer for an event when the event
coordinate is outside the cell area allocation (can happen
on the y axis, not all events are button events).
- Dont remove focus-line-width (inner area) an extra time from
GtkCellArea->event
- Dont remove focus-line-width from the cell area at all for the
editable widget... use the whole area including the focus line
(compared with git master behaviour and now it looks right, check
the multiline editable string in testtreeedit).
Tristan Van Berkom [Mon, 6 Dec 2010 08:03:53 +0000 (17:03 +0900)]
Fixed GtkTreeViewColumn to reset the context when _gtk_tree_view_column_cell_set_dirty is called.
This fixes autosize columns... result can be viewable by checking
tests/testtreeview and setting the second column to autosize and then
expanding/colapsing some rows.
Tristan Van Berkom [Mon, 6 Dec 2010 07:31:07 +0000 (16:31 +0900)]
Changed GtkTreeViewColumn->requested_width to ->padding
Now we bookkeep the treeview assigned padding asides from the
requested width stored in the GtkCellAreaContext, this removes
the need for bookkeeping the deepest expanded depth in gtktreeview.c
At allocation time, just remove the padding from the allocated width
of the column and feed the rest to the underlying cell area.
Tristan Van Berkom [Mon, 6 Dec 2010 07:30:18 +0000 (16:30 +0900)]
Added expand controls to testtreeedit (now you can play with align & expand effects in cells there).
Tristan Van Berkom [Mon, 6 Dec 2010 07:29:40 +0000 (16:29 +0900)]
Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas.
Tristan Van Berkom [Mon, 6 Dec 2010 07:29:13 +0000 (16:29 +0900)]
Fixed gtk-doc statement in GtkCellArea header
Matthias Clasen [Mon, 6 Dec 2010 05:44:58 +0000 (00:44 -0500)]
Make invalid stylesheets fail to parse again
The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.
This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
Matthias Clasen [Mon, 6 Dec 2010 05:44:01 +0000 (00:44 -0500)]
Don't use g_warning when loading an engine fails
This causes the tests to abort if clearlooks can't be found.
Tristan Van Berkom [Mon, 6 Dec 2010 05:11:28 +0000 (14:11 +0900)]
Added gtk_cell_area_foreach_alloc() to further simplify GtkCellArea subclasses
gtk_cell_area_foreach_alloc() itterates over an allocated list of cells
and calls a callback with the cell's allocation until the callback returns
TRUE.
- Removed vfunc get_cell_allocation() and implemented
gtk_cell_area_get_cell_allocation() using foreach_alloc()
- Added gtk_cell_area_get_cell_at_position() using foreach_alloc()
- Removed GtkCellAreaBox ->event() implementation and implemented
mouse "click" cell activation in GtkCellArea class directly using
gtk_cell_area_get_cell_at_position().
Tristan Van Berkom [Mon, 6 Dec 2010 03:41:38 +0000 (12:41 +0900)]
Changed gtk_cell_area_forall to gtk_cell_area_foreach since thats more widely used semantics.
Also gave a boolean return value to the callback to allow breaking out of the loop.
Benjamin Otte [Mon, 6 Dec 2010 00:30:19 +0000 (01:30 +0100)]
appchooser: Remove bogus function declaration
Benjamin Otte [Sun, 5 Dec 2010 14:05:00 +0000 (15:05 +0100)]
style: Remove unused code
Benjamin Otte [Sun, 5 Dec 2010 13:54:43 +0000 (14:54 +0100)]
gdk: Constify argument to gdk_rgba_copy()
Benjamin Otte [Sun, 5 Dec 2010 13:40:35 +0000 (14:40 +0100)]
gdk: Remove depth argument from GdkWindowImpl->get_geometry()
Benjamin Otte [Sun, 5 Dec 2010 13:36:59 +0000 (14:36 +0100)]
API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
Benjamin Otte [Sun, 5 Dec 2010 13:32:59 +0000 (14:32 +0100)]
gdk: Remove nonexisting function from internal header
Paolo Borelli [Sun, 5 Dec 2010 21:05:29 +0000 (22:05 +0100)]
Use the new style context API in GtkButton
Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
Paolo Borelli [Sun, 5 Dec 2010 20:00:59 +0000 (21:00 +0100)]
Use the new style context API in GtkLabel.
Paolo Borelli [Sun, 5 Dec 2010 20:11:34 +0000 (21:11 +0100)]
Remove unused function modify_color_property
Carlos Garnacho [Sun, 5 Dec 2010 19:18:03 +0000 (20:18 +0100)]
GtkStyleContext: warn on meaningless coords in gtk_render_* calls
Carlos Garnacho [Sun, 5 Dec 2010 19:00:44 +0000 (20:00 +0100)]
Bug 636511 - New style override functions do not work on textview
Emit ::style-set on overrider style changes, this is necessary
in the mean time so widgets not listening yet to ::style-updated
get the style changes.
Jorge González [Sun, 5 Dec 2010 17:33:31 +0000 (18:33 +0100)]
Updated Spanish translation
Kristian Rietveld [Sun, 5 Dec 2010 17:18:36 +0000 (18:18 +0100)]
Bring back _gtk_tree_view_column_get_cell_at_pos
The function has been re-implemented around GtkCellArea. This commits
also brings back the invocation of this function in
gtk_tree_view_button_press(). I shouldn't have removed this.
Matthias Clasen [Sun, 5 Dec 2010 17:18:30 +0000 (12:18 -0500)]
Fix abi check after recent merges
Kristian Rietveld [Sun, 5 Dec 2010 17:04:07 +0000 (18:04 +0100)]
Replace FIRST_PIXEL macros with something that's more clear
Kristian Rietveld [Sun, 5 Dec 2010 16:56:30 +0000 (17:56 +0100)]
Clean up and clarify row height calculations
Kristian Rietveld [Sun, 5 Dec 2010 16:12:37 +0000 (17:12 +0100)]
Clean up _gtk_tree_view_column_cell_event
Kristian Rietveld [Sun, 5 Dec 2010 16:10:21 +0000 (17:10 +0100)]
Remove the need for _gtk_tree_view_column_get_focus_area
Kristian Rietveld [Sun, 5 Dec 2010 16:04:52 +0000 (17:04 +0100)]
Clarify start_pos parameter gtk_tree_view_column_cell_get_position
By renaming it to x_offset.
Kristian Rietveld [Sun, 5 Dec 2010 14:20:17 +0000 (15:20 +0100)]
Remove private accessor for focus column
Kristian Rietveld [Sun, 5 Dec 2010 14:18:13 +0000 (15:18 +0100)]
Move _gtk_tree_view_column_cell_focus to gtktreeview.c
Kristian Rietveld [Sun, 5 Dec 2010 14:12:53 +0000 (15:12 +0100)]
Use structure bitfield instead of GtkTreeViewFlags
Fran Diéguez [Sun, 5 Dec 2010 13:57:08 +0000 (14:57 +0100)]
Updated Galician translations
Kristian Rietveld [Sun, 5 Dec 2010 13:47:51 +0000 (14:47 +0100)]
Turn TREE_VIEW_DRAW_EXPANDERS into an inline function
Kristian Rietveld [Sun, 5 Dec 2010 13:42:40 +0000 (14:42 +0100)]
Remove unused TREE_VIEW_COLUMN_REQUESTED_WIDTH macro
Kristian Rietveld [Sun, 5 Dec 2010 13:42:08 +0000 (14:42 +0100)]
Turn TREE_VIEW_HEADER_HEIGHT into an inline function
Tristan Van Berkom [Sun, 5 Dec 2010 06:20:19 +0000 (15:20 +0900)]
Added g_getenv("RTL") to test rtl layouting.
Tristan Van Berkom [Sat, 4 Dec 2010 07:24:31 +0000 (16:24 +0900)]
Fixed conflicts from rebasing GtkTreeViewColumn changes from treeview-refactor.
Tristan Van Berkom [Sat, 4 Dec 2010 05:27:18 +0000 (14:27 +0900)]
Adding testverticalcells.c.
This test displays a GtkTreeViewColumn rendering a vertically
oriented GtkCellArea along side a horizontally oriented column
in the same treeview.
Tristan Van Berkom [Sat, 4 Dec 2010 05:05:15 +0000 (14:05 +0900)]
Removing hack and fixing gtk_tree_view_column_cell_get_size().
Now consult gtk_cell_area_context_get_preferred_height().
It can be that height-for-widths requested here were too large
when multiple cells are in play because of the alignments stored
in the context... removing the temporary focus-line-width hack.
Tristan Van Berkom [Wed, 1 Dec 2010 14:26:25 +0000 (23:26 +0900)]
Added GtkTreeViewColumn:cell-area construct-only property.
Allow feeding treeviewcolumn a custom cell-area (or not a custom one,
but allow sharing the cell-area with say, the combo-box area).
This patch also:
- Fixes signal connections to the area (now they do eventually get
disconnected at dispose time, they are handled regardless if a
treeview is set but execute safely, at least there is only one
connection/disconnection).
- Fixes refcounting on the cell_area (GtkCellArea is GInitiallyUnowned).
- Adds a constructor() in order to build the cell-area if one has
not been provided by the caller before hand at g_object_new()
construct time.
Tristan Van Berkom [Wed, 1 Dec 2010 08:12:32 +0000 (17:12 +0900)]
Fixed GtkTreeViewColumn allocation to only subtract the depth padding/indentation from the expander column.
Tristan Van Berkom [Wed, 1 Dec 2010 07:20:22 +0000 (16:20 +0900)]
Changed GtkTreeView to bookkeep the deepest expanded depth instead of recalculating it at column allocation time.